<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Huiyuan_Search extends CI_Controller  {
	
	function __construct()
 {
  	parent::__construct();
  	$this->load->model('TB_Huiyuan');
 }
	function index()
	{
		$headTitle['title']="中国乡土艺术协会_会员搜索";
		$this->load->view("header",$headTitle);
			$temparr[0]['hy_name']="";
			$temparr[0]['hy_sex']="";
			$temparr[0]['hy_birthday']="";
			$temparr[0]['hy_IDcard']="";
			$temparr[0]['hy_hukou']="";
			$temparr[0]['hy_huiyuan_no']="";
			$temparr[0]['hy_indate']="";
			$temparr[0]['hy_clientname']="";
			$temparr[0]['hy_duty']="";
			$temparr[0]['hy_photo']="";
			$temparr[0]['hy_meno']="";
			$Data["hyEntity"]=$temparr;
		$this->load->view("search_huiyuan",$Data);
		$this->load->view("footer");
	}
	function Search()
	{
		$headTitle['title']="会员搜索";
		$this->load->view("header",$headTitle);
		$Data["temp"]=$this->TB_Huiyuan->GetHuiyuanByNo($_POST["search"]);
		if($Data["temp"]==null)
		{
		//	$temparr[0]=array("aa"=>(array("Title"=>"","NewsSource"=>"","OrderNum"=>"","Content"=>"")));
		
			$temparr[0]['hy_name']="";
			$temparr[0]['hy_sex']="";
			$temparr[0]['hy_birthday']="";
			$temparr[0]['hy_IDcard']="";
			$temparr[0]['hy_hukou']="";
			$temparr[0]['hy_huiyuan_no']="";
			$temparr[0]['hy_indate']="";
			$temparr[0]['hy_clientname']="";
			$temparr[0]['hy_duty']="";
			$temparr[0]['hy_photo']="";
			$temparr[0]['hy_meno']="";
			$Data["hyEntity"]=$temparr;
		}
		else
		{
			$temparr[0]['hy_name']=$Data["temp"][0]->hy_name;
			$temparr[0]['hy_sex']=$Data["temp"][0]->hy_sex;
			$temparr[0]['hy_birthday']=$Data["temp"][0]->hy_birthday;
			$temparr[0]['hy_IDcard']=$Data["temp"][0]->hy_IDcard;
			$temparr[0]['hy_hukou']=$Data["temp"][0]->hy_hukou;
			$temparr[0]['hy_huiyuan_no']=$Data["temp"][0]->hy_huiyuan_no;
			$temparr[0]['hy_indate']=$Data["temp"][0]->hy_indate;
			$temparr[0]['hy_clientname']=$Data["temp"][0]->hy_clientname;
			$temparr[0]['hy_duty']=$Data["temp"][0]->hy_duty;
			$temparr[0]['hy_photo']=$Data["temp"][0]->hy_photo;
			$temparr[0]['hy_meno']=$Data["temp"][0]->hy_meno;
			$Data["hyEntity"]=$temparr;
		}
		$this->load->view("search_huiyuan",$Data);
		$this->load->view("footer");
	}
} 
?>